package com.ymatou.iapi.im.parameter.emu;

public enum MessageAttachType {
    /// <summary>
    /// 没有附件
    /// </summary>
    None(0),
    /// <summary>
    /// 神器订单信息
    /// </summary>
    AppOrder(1),
    /// <summary>
    /// 神器提示信息
    /// </summary>
    AppTips(2),
    /// <summary>
    /// 神器产品信息
    /// </summary>
    AppProduct(5),
    /// <summary>
    /// 码头订单
    /// </summary>
    MatouOrder(21),
    /// <summary>
    /// 码头产品信息
    /// </summary>
    MatouProduct(25),


    /*
     * 会话转接提醒
     * */
    TransferTip(26),

    /*
     * 危险url提醒
     * */
    RiskUrl(27);

    private int value = 0;

    MessageAttachType(int value) {
        this.value = value;
    }

    public int value() {
        return this.value;
    }
    public static MessageAttachType valueOf(int value) {    //    手写的从int到enum的转换函数
        switch (value) {
            case 0:
                return None;
            case 1:
                return AppOrder;
            case 2:
                return AppTips;
            case 5:
                return AppProduct;
            case 21:
                return MatouOrder;
            case 25:
                return MatouProduct;
            case 26:
                return TransferTip;
            case 27:
                return RiskUrl;
            default:
                return null;
        }
    }
}
